<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>YuTori Class: クラス TestCaseofYuToriAdd</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 作成： Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "../../search",false,'検索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">YuTori Class</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>メインページ</span></a></li>
      <li><a href="../../pages.html"><span>関連ページ</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>データ構造</span></a></li>
      <li><a href="../../files.html"><span>ファイル</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="検索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>データ構造</span></a></li>
      <li><a href="../../classes.html"><span>データ構造索引</span></a></li>
      <li><a href="../../inherits.html"><span>クラス階層</span></a></li>
      <li><a href="../../functions.html"><span>データフィールド</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public メソッド</a>  </div>
  <div class="headertitle">
<div class="title">クラス TestCaseofYuToriAdd</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="TestCaseofYuToriAdd" --><table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public メソッド</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d69/class_test_caseof_yu_tori_add.html#a095c5d389db211932136b53f25f39685">__construct</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d69/class_test_caseof_yu_tori_add.html#a9ccea53edacfb09c34b4bc7889865d75">TestOfBase</a> ()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>説明</h2>
<div class="textblock"><p>addメソッドのテスト</p>
<p>オブジェクト生成の箇所は単にnewObjectを使っているだけなので、 その部分の試験はfactoryの試験で担保できているとし、割愛します。</p>
<dl class="since"><dt><b>から:</b></dt><dd>2012/03/11 </dd></dl>

<p> <a class="el" href="../../d8/d0d/add_8php_source.html">add.php</a> の <a class="el" href="../../d8/d0d/add_8php_source.html#l00010">10</a> 行で定義されています。</p>
</div><hr/><h2>コンストラクタとデストラクタ</h2>
<a class="anchor" id="a095c5d389db211932136b53f25f39685"></a><!-- doxytag: member="TestCaseofYuToriAdd::__construct" ref="a095c5d389db211932136b53f25f39685" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__construct </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p> <a class="el" href="../../d8/d0d/add_8php_source.html">add.php</a> の <a class="el" href="../../d8/d0d/add_8php_source.html#l00011">11</a> 行で定義されています。</p>
<div class="fragment"><pre class="fragment">                                       {
        }
</pre></div>
</div>
</div>
<hr/><h2>関数</h2>
<a class="anchor" id="a9ccea53edacfb09c34b4bc7889865d75"></a><!-- doxytag: member="TestCaseofYuToriAdd::TestOfBase" ref="a9ccea53edacfb09c34b4bc7889865d75" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TestOfBase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>子オブジェクトに正常に追加されるか </p>

<p> <a class="el" href="../../d8/d0d/add_8php_source.html">add.php</a> の <a class="el" href="../../d8/d0d/add_8php_source.html#l00017">17</a> 行で定義されています。</p>
<div class="fragment"><pre class="fragment">                                      {
                <span class="comment">// 親オブジェクト</span>
                $p = <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a> (<span class="stringliteral">&#39;&#39;</span>, <span class="stringliteral">&#39;test&#39;</span>);
                
                $p-&gt;add (<span class="stringliteral">&#39;child&#39;</span>, <span class="stringliteral">&#39;childName&#39;</span>);
                $this-&gt;assertFalse($p-&gt;child(<span class="stringliteral">&#39;childName&#39;</span>)-&gt;isEmpty() , <span class="stringliteral">&#39;childで通常取得&#39;</span>);

                $p-&gt;add (<span class="stringliteral">&#39;child2&#39;</span>, <span class="stringliteral">&#39;childName2&#39;</span>);
                $this-&gt;assertIdentical($p-&gt;child(<span class="stringliteral">&#39;childName2&#39;</span>)-&gt;call(), <span class="stringliteral">&#39;child2&#39;</span> , <span class="stringliteral">&#39;追加した上で取得できるか&#39;</span>);
                $this-&gt;assertIdentical($p-&gt;child(<span class="stringliteral">&#39;childName&#39;</span>)-&gt;call(), <span class="stringliteral">&#39;child&#39;</span> , <span class="stringliteral">&#39;追加した時に元のオブジェクトに影響がないか&#39;</span>);

                $p-&gt;add (<span class="stringliteral">&#39;child3&#39;</span>, <span class="stringliteral">&#39;childName&#39;</span>);
                $this-&gt;assertIdentical($p-&gt;child(<span class="stringliteral">&#39;childName&#39;</span>)-&gt;call(), <span class="stringliteral">&#39;child3&#39;</span> , <span class="stringliteral">&#39;名称重複時に上書きされるか&#39;</span>);

                $p-&gt;add (<span class="stringliteral">&#39;child4&#39;</span>);
                $this-&gt;assertIdentical($p-&gt;child(2)-&gt;call(), <span class="stringliteral">&#39;child4&#39;</span> , <span class="stringliteral">&#39;名称未指定時に追加されるか&#39;</span>);

                $p-&gt;add (<span class="stringliteral">&#39;child5&#39;</span>, 0);
                $this-&gt;assertIdentical($p-&gt;child(3)-&gt;call(), <span class="stringliteral">&#39;child5&#39;</span> , <span class="stringliteral">&#39;名称に0指定時に追加されるか&#39;</span>);

                $p-&gt;add (<span class="stringliteral">&#39;child6&#39;</span>, 3);
                $this-&gt;assertIdentical($p-&gt;child(3)-&gt;call(), <span class="stringliteral">&#39;child6&#39;</span> , <span class="stringliteral">&#39;数値名称で重複時に追加されるか&#39;</span>);
        }
</pre></div>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全て</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>データ構造</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>関数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>変数</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>YuTori Classに対してMon May 21 2012 00:22:17に生成されました。&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
